package com.edg.controller;

import com.edg.service.UserService;
import entity.CommonResult;
import entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {
    @Value("${server.port}")
    private String serverPort;

    @Autowired
    private UserService userService;

    @GetMapping("/port")
    public String getServerPort(){
        return "nacos" + serverPort;
    }

//    @RequestMapping("/all")
//    public CommonResult listUser()
//    {
//        List<User> list = userService.listUser();
//        return new CommonResult(200,"查询成功",list);
//    }


}
